home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / c / genmo112.lha / GTB-Modula / GenModula.doc < prev    next >
Encoding:
Text File  |  1993-09-28  |  4.9 KB  |  131 lines

  1. GenModula 1.12 - Modula 2 Sourcecode Generator For GadToolsBox
  2. ------------------------------------------------------------
  3.  
  4. This program is directly ported from OG, the Oberon sourcecode
  5. generator by Thomas Igracki and Kai Bolay.
  6.  
  7.  
  8. Please, see documentation of OG.mod for more information and history:
  9. » GadToolsBox's great Oberon Source Generator
  10. » ===========================================
  11. »
  12. » This is the second release of the external Oberon source generator for
  13. » GadToolsBox 2.x.  Please use it instead of the built in source generator
  14. » because some the internal version is buggy and will not be updated any more.
  15. »
  16. » Let's explan the history of generating Oberon source with GadToolsBox:
  17. » I (Kai Bolay) thougt that it would be a good idea that GadToolsBox supports
  18. » Oberon so I changed Jan van den Baard's C generator "GenC.c" to
  19. » "GenOberon.c" and asked Jan to add it to GTB. With GTB 2.0 Jan came up with
  20. » the idea of external source generators. Jan helped me (in fact he did all
  21. » the work! Thanks, Jan!) to make "GenOberon.c" a standalone program. Now
  22. » Thomas Igracki did the great job of converting to C program "GenOberon.c"
  23. » to the Oberon program "OG.mod". I did some minor modifications to "OG.mod"
  24. » and released it.
  25.  
  26.  
  27. This program does almost the same as OG. Only some additions and fixes
  28. are made. However the complete code is restructured and split into
  29. modules. The definition file including the module interface contains
  30. only very few objects, this may be expanded in future.
  31.  
  32.  
  33. Usage:
  34.   GenModula: NAME/A,TO=AS/A,RASTER/S,UNDERMOUSE/S,NODEF/S
  35.  
  36. NAME
  37.   Desined GadToolsBox gui-file,
  38.  
  39. TO
  40.   Basename for module and file to be generated, The name may be preced
  41.   with a path.
  42.  
  43. RASTER
  44.   Boolean argument to get a filled background. This will be done only
  45.   if the window contains bevel-boxes.
  46.  
  47. UNDERMOUSE
  48.   Opens the window at the actual mouse position.
  49.  
  50. NODEF
  51.   Generate a definition file with suffix .nodef. This opition is
  52.   usefull when update an allready existing gui. It is now not
  53.   neccessary to compile the module which use the gui. Furthermore you
  54.   can compare the new definition file ending with "nodef" against the
  55.   old one.
  56.  
  57.  
  58. Interface:
  59.   I give just a few hints about the generated interface files. Please
  60.   look at the definition files.
  61.  
  62.   Procedures to get and get rid of a screen, window or gadgets are named
  63.   in correspondece with gadtools.library: CreateXXX and FreeXXX. This
  64.   may show you: these procedures handle more than simply open and
  65.   close a screen or window!
  66.   All procedures include the actual project name (see GadToolsBox for more).
  67.   About the return values: a return value of 0 indicate success, other values
  68.   indicate an error, see generated source for a concrete value.
  69.  
  70.   Screen:
  71.     PROCEDURE CreateTestScreen  (    pubScreenName    :ARRAY OF CHAR) :CARDINAL;
  72.     PROCEDURE FreeTestScreen;
  73.  
  74.     CreateXXXScreen can have an argument, this depends on the screen type.
  75.  
  76.   Gadgets:
  77.     PROCEDURE CreateListGadgets () :CARDINAL;
  78.  
  79.     This procedure is used to create gadgets before open the window.
  80.     The gadgetlist is implicit deallocated by FreeXXXWindow.
  81.  
  82.   Windows:
  83.     PROCEDURE CreateListWindow  (    createGadgets    :BOOLEAN) :CARDINAL;
  84.     PROCEDURE FreeListWindow;
  85.     PROCEDURE RefreshListWindow;
  86.  
  87.     Creation of window is done including all neccessary startup. Use
  88.     createGadgets = FALSE only and if you called CreateXXXGadgets
  89.     before CreateXXXWindow!
  90.     After creating the window it is already complete refreshed.
  91.  
  92.     After getting the IDCMP-message refreshWindow you should call
  93.     RefreshXXXWindow. Do NOT surround this call by GTBeginRefresh and
  94.     GTEndRefresh, this is handled internal. Since using GadToolsBox
  95.     you don't need to render anything to refresh your window.
  96.  
  97.   To access gadgets, menus or windows use but not change them by
  98.   given pointers in the definition file. Remember to use explicit
  99.   constants and not the values of them.
  100.  
  101.   When using a GetFile-gadget you had to link the programm with the
  102.   "l" option for additional files. Type:
  103.     -lfullpath/bases.o  -lfullpath/boopsi.o   programname
  104.   Remember the absent space after the l-option.
  105.  
  106.  
  107. About different behaviour of GenModula to OG (Oberon Generator):
  108. First of all, I had to generate a seperate definition file for Modula.
  109. I think this is a great advantage for you because you don't need to
  110. check the whole implementation nor you have to generate a definition
  111. file with a tool (included with Oberon but this doesn't help a Modula User).
  112.  
  113. You don't care about the correct window rendering. Not for the first
  114. time when open a window nor in further times. Just call
  115. RenderXXXWindow when getting a refreshWindow message.
  116. The treatment of window rendering and refreshing is much improved to
  117. OG. In particular using the RASTER-option the rendering is done in the
  118. right order. Gadgets will be refreshed only at one time.
  119.  
  120.  
  121. Contact me if you have suggestions, questions or bugs:
  122.  
  123. Reiner B. Nix
  124. Snail Mail:
  125.   Geranienhof 2
  126.   50769 Köln Seeberg
  127.   Germany
  128.  
  129. EMail:
  130.   UseNet: rbnix@pool.informatik.rwth-aachen.de
  131.